home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / tjgold.zip / INSTALL.003 / DEMPLL4.PAS < prev    next >
Pascal/Delphi Source File  |  1995-05-29  |  18KB  |  361 lines

  1. {--------------------------------------------------------------------------}
  2. {                Product: TechnoJock's Turbo Toolkit GOLD                  }
  3. {                                                                          }
  4. {                     TTT GOLD - DEMO PROGRAM                        }
  5. {                                                                          }
  6. {                Copyright 1986-1995  TechnoJock Software, Inc.            }
  7. {                           All Rights Reserved                            }
  8. {                          Restricted by License                           }
  9. {--------------------------------------------------------------------------}
  10.  
  11. {Description: DEMPLL4.PAS
  12.               Shows how to create an imitation of the Borland Pascal
  13.               7.0 IDE menu.
  14. }
  15.  
  16. program DemPll4;
  17.  
  18. {$I GOLDFLAG.INC}
  19.  
  20. uses DOS, CRT, GoldFast, GoldKey, GoldMenu, GoldAttr,
  21.      GoldWin, GoldStr, GoldMisc, GoldTint;
  22.  
  23. var
  24.    MainMenu: Bar;
  25.    FileMenu: PopUp;
  26.    EditMenu: PopUp;
  27.    SearchMenu: PopUp;
  28.    RunMenu: PopUp;
  29.    CompileMenu: PopUp;
  30.    DebugMenu: PopUp;
  31.    ToolsMenu: PopUp;
  32.    OptionsMenu: PopUp;
  33.    WindowMenu: PopUp;
  34.    HelpMenu: PopUp;
  35.    EnvironmentMenu: PopUp;
  36.    Choice: word;
  37.  
  38. {$F+}
  39. procedure MenuHelp(ID:integer);
  40. {}
  41. begin
  42.    PromptOK(' Help! ','You asked for help on menu item ID: '+IntToStr(ID));
  43. end; { MenuHelp }
  44. {$F-}
  45.  
  46. procedure DefineFilePopUp;
  47. {}
  48. begin
  49.    InitPopUp(FileMenu);
  50.    PopUpAddItem(FileMenu,'~N~ew',101,78,'Create a new file in a new Edit window',nil);
  51.    PopUpAddItem(FileMenu,'~O~pen...:F3',102,79,'Locate and open in an Edit window',nil);
  52.    PopUpAddItem(FileMenu,'~S~ave:F2',103,83,'Save the file in the active Edit window',nil);
  53.    PopUpAddItem(FileMenu,'Save ~a~s...',104,65,'Save the current file under a different name directory or drive',nil);
  54.    PopUpAddItem(FileMenu,'Save a~l~l',105,76,'Save all modified files',nil);
  55.    PopUpAddItem(FileMenu,'-',0,0,'',nil); {separator}
  56.    PopUpAddItem(FileMenu,'~C~hange dir...',106,67,'Choose a new default directory',nil);
  57.    PopUpAddItem(FileMenu,'~P~rint',107,80,'Print the contents of the active Edit window',nil);
  58.    PopUpAddItem(FileMenu,'P~r~inter setup',108,82,'Choose printer filter to use for printing',nil);
  59.    PopUpAddItem(FileMenu,'~D~os shell',109,68,'Temporily exit to DOS',nil);
  60.    PopUpAddItem(FileMenu,'E~x~it',110,88,'~Exit~ Turbo Pascal',nil);
  61. end; { DefineFilePopUp }
  62.  
  63. procedure DefineEditPopUp;
  64. {}
  65. begin
  66.    InitPopUp(EditMenu);
  67.    PopUpAddItem(EditMenu,'~U~ndo:Alt+BkSp',201,85,'Undo the previous editor operation',nil);
  68.    PopUpAddItem(EditMenu,'!~R~edo',202,82,'Redo the previously undone editor operation',nil);
  69.    PopUpAddItem(EditMenu,'-',0,0,'',nil);
  70.    PopUpAddItem(EditMenu,'!Cu~t~:Shift+Del',203,84,'Remove the selected text and put it in the Clipboard',nil);
  71.    PopUpAddItem(EditMenu,'!~C~opy:Ctrl+Ins',204,67,'Copy the selected text into the Clipboard',nil);
  72.    PopUpAddItem(EditMenu,'!~P~aste:Shift+Ins',205,80,'Insert selected text from the Clipboard at the cursor position',nil);
  73.    PopUpAddItem(EditMenu,'!C~l~ear:Ctrl+Del',206,76,'Delete the selected text',nil);
  74.    PopUpAddItem(EditMenu,'-',0,0,'',nil);
  75.    PopUpAddItem(EditMenu,'~S~how clipboard',207,83,'Open the Clipboard window',nil);
  76. end; { DefineEditPopUp }
  77.  
  78. procedure DefineSearchPopUp;
  79. {}
  80. begin
  81.    InitPopUp(SearchMenu);
  82.     PopUpAddItem(SearchMenu,'~F~ind...',301,70,'Search for text',nil);
  83.     PopUpAddItem(SearchMenu,'~R~eplace...',302,82,'Search for text and replace it with new text',nil);
  84.     PopUpAddItem(SearchMenu,'~S~earch again',303,83,'Repeat the last Find or Replace command',nil);
  85.     PopUpAddItem(SearchMenu,'-',0,0,'',nil);
  86.     PopUpAddItem(SearchMenu,'~G~o to line number',304,71,'Move the cursor to a specified line number',nil);
  87.     PopUpAddItem(SearchMenu,'!Show last ~c~ompiler error',305,67,
  88.                             'Move the cursor to the position of the last compiler error',nil);
  89.     PopUpAddItem(SearchMenu,'Find ~e~rror',306,69,'Move the cursor to the position of a runtime error',nil);
  90.     PopUpAddItem(SearchMenu,'Find ~p~rocedure',307,80,'Search for a procedure or function declaration while debugging',nil);
  91.     PopUpAddItem(SearchMenu,'-',0,0,'',nil);
  92.     PopUpAddItem(SearchMenu,'!Previous ~b~rowser',308,66,'Redisplay the last-viewed browser window',nil);
  93.     PopUpAddItem(SearchMenu,'~O~bjects',309,79,'Open a browser displaying all objects in the program',nil);
  94.     PopUpAddItem(SearchMenu,'~U~nits',310,85,'Open a browser displaying all units in the program',nil);
  95.     PopUpAddItem(SearchMenu,'G~l~obals',311,76,'Open a browser displaying all global symbols in the program',nil);
  96.     PopUpAddItem(SearchMenu,'-',0,0,'',nil);
  97.     PopUpAddItem(SearchMenu,'S~y~mbol',312,83,'Enter symbol to browse',nil);
  98. end; { DefineSearchPopUp }
  99.  
  100. procedure DefineRunPopUp;
  101. {}
  102. begin
  103.    InitPopUp(RunMenu);
  104.    PopUpAddItem(RunMenu,'~R~un:Ctrl+F9',401,82,'Run the current program',nil);
  105.    PopUpAddItem(RunMenu,'~S~tep over:F8',402,83,'Execute next statement, skipping over the current procedure',nil);
  106.    PopUpAddItem(RunMenu,'~T~race into:F7',403,84,'Execute next statement, stopping within the current procedure',nil);
  107.    PopUpAddItem(RunMenu,'~G~o to cursor:F4',404,71,'Run the program from the run bar to the cursor position',nil);
  108.    PopUpAddItem(RunMenu,'!~P~rogram reset',405,80,'Halt debugging session and release memory',nil);
  109.    PopUpAddItem(RunMenu,'P~a~rameters',406,65,'Set command-line parameters to be passed to program',nil);
  110. end; { DefineRunPopUp }
  111.  
  112. procedure DefineCompilePopUp;
  113. {}
  114. begin
  115.    InitPopUp(CompileMenu);
  116.    PopUpAddItem(CompileMenu,'~C~ompile:Alt+F9',501,67,'Compile source file',nil);
  117.    PopUpAddItem(CompileMenu,'~M~ake:F9',502,77,'Rebuild source file and all other files that have been modified',nil);
  118.    PopUpAddItem(CompileMenu,'~B~uild',503,66,'Rebuild source file and all other files',nil);
  119.    PopUpAddItem(CompileMenu,'-',0,0,'',nil);
  120.    PopUpAddItem(CompileMenu,'~T~arget...:Real',504,84,'Select target platform to compile for',nil);
  121.    PopUpAddItem(CompileMenu,'~P~rimary file...',505,80,'Define the file that is the focus of Make and Build',nil);
  122.    PopUpAddItem(CompileMenu,'C~l~ear primary file',506,76,'Clear the file previously set with Primary file',nil);
  123.    PopUpAddItem(CompileMenu,'-',0,0,'',nil);
  124.    PopUpAddItem(CompileMenu,'~I~nformation',507,73,'Show status information',nil);
  125. end; { DefineCompilePopUp }
  126.  
  127. procedure DefineDebugPopUp;
  128. {}
  129. begin
  130.    InitPopUp(DebugMenu);
  131.    PopUpAddItem(DebugMenu,'~B~reakpoints...',601,66,'Set conditional breakpoints, view and edit breakpoints',nil);
  132.    PopUpAddItem(DebugMenu,'~C~all stack:Ctrl+F3',602,67,'Show the procedures the program called to reach this point',nil);
  133.    PopUpAddItem(DebugMenu,'~R~egister',603,82,'Open the Register window',nil);
  134.    PopUpAddItem(DebugMenu,'~W~atch',604,87,'Open the Watch window',nil);
  135.    PopUpAddItem(DebugMenu,'~O~utput',605,79,'Open the Output window',nil);
  136.    PopUpAddItem(DebugMenu,'~U~ser screen',606,85,'Switch to the full-screen user output',nil);
  137.    PopUpAddItem(DebugMenu,'-',0,0,'',nil);
  138.    PopUpAddItem(DebugMenu,'~E~valuate/modify...',607,69,
  139.                           'Evaluate a variable or expression and display or modify the value',nil);
  140.    PopUpAddItem(DebugMenu,'~A~dd watch...:Ctrl+F7',608,65,'Insert a watch expression into a Watch window',nil);
  141.    PopUpAddItem(DebugMenu,'Add break~p~oint...',609,80,'Add a breakpoint expression',nil);
  142. end; { DefineDebugPopUp }
  143.  
  144. procedure DefineToolsPopUp;
  145. {}
  146. begin
  147.    InitPopUp(ToolsMenu);
  148.    PopUpAddItem(ToolsMenu,'~M~essages',701,77,'Open the message window',nil);
  149.    PopUpAddItem(ToolsMenu,'!Go to ~n~ext:Alt+F8',702,78,'Go to the next source position',nil);
  150.    PopUpAddItem(ToolsMenu,'!Go to ~p~revious:Alt+F7',703,80,'Go to the previous source position',nil);
  151.    PopUpAddItem(ToolsMenu,'-',0,0,'',nil);
  152.    PopUpAddItem(ToolsMenu,'~G~rep',704,71,'User installed tool:Shift+F2',nil);
  153.    PopUpAddItem(ToolsMenu,'Turbo ~A~ssembler:Shift+F3',705,65,'User installed tool',nil);
  154.    PopUpAddItem(ToolsMenu,'Turbo ~D~ebugger:Shift+F4',706,68,'User installed tool',nil);
  155.    PopUpAddItem(ToolsMenu,'Turbo P~r~ofiler:Shift+F5',707,82,'User installed tool',nil);
  156. end; { DefineToolsPopUp }
  157.  
  158. procedure DefineOptionsPopUp;
  159. {}
  160. begin
  161.    InitPopUp(OptionsMenu);
  162.    PopUpAddItem(OptionsMenu,'~C~ompiler...',801,67,'Set default compiler directives and conditional defines',nil);
  163.    PopUpAddItem(OptionsMenu,'~M~emory sizes...',802,77,'Set default stack and heap sizes for generated programs',nil);
  164.    PopUpAddItem(OptionsMenu,'~L~inker...',803,76,'Set linker options (link buffer; .MAP file options)',nil);
  165.    PopUpAddItem(OptionsMenu,'De~b~ugger...',804,66,'Set debugger options (standalone, integrated, display swapping)',nil);
  166.    PopUpAddItem(OptionsMenu,'~D~irectories...',805,68,'Set paths for units, include files, OBJs, and generated files',nil);
  167.    PopUpAddItem(OptionsMenu,'Bro~w~ser...',806,87,'Set global browser settings',nil);
  168.    PopUpAddItem(OptionsMenu,'~T~ools...',807,84,'Create or change tools',nil);
  169.    PopUpAddItem(OptionsMenu,'-',0,0,'',nil);
  170.    PopUpAddItem(OptionsMenu,'~E~nvironment...',808,69,'Specify environment settings',@EnvironmentMenu);
  171.    PopUpAddItem(OptionsMenu,'-',0,0,'',nil);
  172.    PopUpAddItem(OptionsMenu,'~O~pen...',809,79,'Load options file previously created with Save Options',nil);
  173.    PopUpAddItem(OptionsMenu,'~S~ave:\BP\BIN\BP.TP',810,83,'Save all the settings you''ve made in the Options menu',nil);
  174.    PopUpAddItem(OptionsMenu,'Save ~a~s',811,65,'Save all the settings in the Options menu to another file',nil);
  175. end; { DefineOptionsPopUp }
  176.  
  177. procedure DefineWindowPopUp;
  178. {}
  179. begin
  180.    InitPopUp(WindowMenu);
  181.    PopUpAddItem(WindowMenu,'~T~ile',901,84,'Arrange windows on desktop by tiling',nil);
  182.    PopUpAddItem(WindowMenu,'C~a~scading',902,65,'Arrange windows on desktop by cascading',nil);
  183.    PopUpAddItem(WindowMenu,'Cl~o~se all',903,79,'Close all windows on the desktop',nil);
  184.    PopUpAddItem(WindowMenu,'~R~efresh display',904,82,'Redraw the screen',nil);
  185.    PopUpAddItem(WindowMenu,'-',0,0,'',nil);
  186.    PopUpAddItem(WindowMenu,'~S~ize/Move:Ctrl+F5',905,83,'Change the size or position of the active window',nil);
  187.    PopUpAddItem(WindowMenu,'~Z~oom',906,90,'Enlarge or restore the size of the active window',nil);
  188.    PopUpAddItem(WindowMenu,'~N~ext',907,78,'Make the next window active',nil);
  189.    PopUpAddItem(WindowMenu,'~P~revious',908,80,'Make the previous window active',nil);
  190.    PopUpAddItem(WindowMenu,'~C~lose',909,67,'Close the active window',nil);
  191.    PopUpAddItem(WindowMenu,'-',0,0,'',nil);
  192.    PopUpAddItem(WindowMenu,'~L~ist',910,76,'Show a list of all open windows',nil);
  193. end; { DefineWindowPopUp }
  194.  
  195. procedure DefineHelpPopUp;
  196. {}
  197. begin
  198.    InitPopUp(HelpMenu);
  199.    PopUpAddItem(HelpMenu,'~C~ontents',9001,67,'Show table of contents for online Help',nil);
  200.    PopUpAddItem(HelpMenu,'~I~ndex:Shift+F1',9002,73,'Show index for online Help',nil);
  201.    PopUpAddItem(HelpMenu,'~T~opic search:Ctrl+F1',9003,84,'Display help on the word at the cursor',nil);
  202.    PopUpAddItem(HelpMenu,'~P~revious topic:Alt+F1',9004,80,'Redisplay the last-viewed online Help screen',nil);
  203.    PopUpAddItem(HelpMenu,'Using ~h~elp',9005,72,'How to use online Help',nil);
  204.    PopUpAddItem(HelpMenu,'~F~iles...',9006,70,'Add or delete installed help files',nil);
  205.    PopUpAddItem(HelpMenu,'-',0,0,'',nil);
  206.    PopUpAddItem(HelpMenu,'Compiler ~d~irectives',9007,68,'Display help about the compiler directives',nil);
  207.    PopUpAddItem(HelpMenu,'Pr~o~cedures and functions',9008,79,'Display help about procedures and functions',nil);
  208.    PopUpAddItem(HelpMenu,'~R~eserved words',9009,82,'Display Borland Pascal''s reserved words',nil);
  209.    PopUpAddItem(HelpMenu,'Standard ~u~nits',9010,85,'Display help about standard Borland Pascal units',nil);
  210.    PopUpAddItem(HelpMenu,'Borland Pascal ~L~anguages',9011,76,'Display help about standard Borland Pascal language',nil);
  211.    PopUpAddItem(HelpMenu,'~E~rror messages',9012,69,'Display help about the error messages',nil);
  212.    PopUpAddItem(HelpMenu,'-',0,0,'',nil);
  213.    PopUpAddItem(HelpMenu,'~A~bout...',9013,65,'Show version and copyright information',nil);
  214. end; { DefineHelpPopUp }
  215.  
  216. procedure DefineEnvironmentPopUp;
  217. {}
  218. begin
  219.    InitPopUp(EnvironmentMenu);
  220.    PopUpAddItem(EnvironmentMenu,'~P~references...',851,80,'Specify desktop settings',nil);
  221.    PopUpAddItem(EnvironmentMenu,'~E~ditor...',852,69,'Specify editor settings',nil);
  222.    PopUpAddItem(EnvironmentMenu,'~M~ouse...',853,77,'Specify mouse settings',nil);
  223.    PopUpAddItem(EnvironmentMenu,'~S~tartup...',854,83,'Permanently change default startup options',nil);
  224.    PopUpAddItem(EnvironmentMenu,'~C~olors...',855,67,'Customize IDE colors for windows, menus, etc.',nil);
  225. end; { DefineEnvironmentPopUp }
  226.  
  227. procedure DefinePopups;
  228. {}
  229. begin
  230.    DefineFilePopUp;
  231.    DefineEditPopUp;
  232.    DefineSearchPopUp;
  233.    DefineRunPopUp;
  234.    DefineCompilePopUp;
  235.    DefineDebugPopUp;
  236.    DefineToolsPopUp;
  237.    DefineOptionsPopUp;
  238.    DefineWindowPopUp;
  239.    DefineHelpPopUp;
  240.    DefineEnvironmentPopUp;
  241. end; { DefinePopups }
  242.  
  243. procedure DefineMainMenu;
  244. {}
  245. begin
  246.    InitBar(MainMenu);
  247.    BarAddItem(MainMenu,'~F~ile',100,70,289,'File management commands (open, new, etc).',@FileMenu);
  248.    BarAddItem(MainMenu,'~E~dit',200,69,274,'Cut-and-paste editing commands',@EditMenu);
  249.    BarAddItem(MainMenu,'~S~earch',300,83,287,'Text and error search commands',@SearchMenu);
  250.    BarAddItem(MainMenu,'~R~un',400,82,275,'Execute or single step through a program',@RunMenu);
  251.    BarAddItem(MainMenu,'~C~ompile',500,67,302,'Compile to disk or memory',@CompileMenu);
  252.    BarAddItem(MainMenu,'~D~ebug',600,68,288,'Evaluate expressions, modify data, set breakpoints and watches',@DebugMenu);
  253.    BarAddItem(MainMenu,'~T~ools',700,84,276,'Tracking commands and user installed tools',@ToolsMenu);
  254.    BarAddItem(MainMenu,'~O~ptions',800,79,280,'Set defaults for compiler, editor, mouse, debugger, etc.',@OptionsMenu);
  255.    BarAddItem(MainMenu,'~W~indow',900,87,273,'Open, arrange and list windows',@Windowmenu);
  256.    BarAddItem(MainMenu,'~H~elp',9000,72,289,'Get online help',@HelpMenu);
  257.    BarAddHK(MainMenu,317,102); {F3 - File Open}
  258.    BarAddHK(MainMenu,316,103); {F2 - File Save}
  259.    BarAddHK(MainMenu,270,201); {Alt+BkSp - Undo}
  260.    BarAddHK(MainMenu,263,203); {Shift+Del - Cut}
  261.    BarAddHK(MainMenu,260,204); {Ctrl+Ins - Copy}
  262.    BarAddHK(MainMenu,261,205); {Shift+Ins - Paste}
  263.    BarAddHK(MainMenu,262,206); {Ctrl+Del - Clear}
  264.    BarAddHK(MainMenu,358,401); {Ctrl+F9 - Run}
  265.    BarAddHK(MainMenu,322,402); {F8 - Step over}
  266.    BarAddHK(MainMenu,321,403); {F7 - Trace into}
  267.    BarAddHK(MainMenu,318,404); {F4 - Go to cursor}
  268.    BarAddHK(MainMenu,351,405); {Ctrl+F2 - Program reset}
  269.    BarAddHK(MainMenu,368,501); {Alt+F9 - Compile}
  270.    BarAddHK(MainMenu,323,502); {F9 - Make}
  271.    BarAddHK(MainMenu,352,602); {Ctrl+F3 - Call stack}
  272.    BarAddHK(MainMenu,364,606); {Alt+F5 - User screen}
  273.    BarAddHK(MainMenu,353,607); {Ctrl+F4 - Evaluate/modify}
  274.    BarAddHK(MainMenu,356,608); {Ctrl+F7 - Add watch}
  275.    BarAddHK(MainMenu,367,702); {Alt+F8 - Go to next}
  276.    BarAddHK(MainMenu,366,703); {Alt+F7 - Go to previous}
  277.    BarAddHK(MainMenu,341,704); {Shift+F2 - Grep}
  278.    BarAddHK(MainMenu,342,705); {Shift+F3 - Turbo Assembler}
  279.    BarAddHK(MainMenu,343,706); {Shift+F4 - Turbo Debugger}
  280.    BarAddHK(MainMenu,344,707); {Shift+F5 - Turbo Profiler}
  281.    BarAddHK(MainMenu,354,905); {Ctrl+F5 - Size/Move}
  282.    BarAddHK(MainMenu,319,906); {F5 - Zoom}
  283.    BarAddHK(MainMenu,320,907); {F6 - Next}
  284.    BarAddHK(MainMenu,345,908); {Shift+F6 - Previous}
  285.    BarAddHK(MainMenu,342,909); {Alt+F3 - Close}
  286.    BarAddHK(MainMenu,385,910); {Alt+0 - List}
  287.    BarAddHK(MainMenu,340,9002); {Shift+F1 - Index}
  288.    BarAddHK(MainMenu,350,9003); {Ctrl+F1 - Topic search}
  289.    BarAddHK(MainMenu,360,9004); {Alt+F1 - Previous topic}
  290. end; { DefineMainMenu }
  291.  
  292. procedure SetScreen;
  293. {Paints the background}
  294. begin
  295.    case MainMenu.Style of
  296.      3: FBox(1,2,80,24,whiteonblue,4);
  297.      4: FBox(1,3,80,25,whiteonblue,4);
  298.      else
  299.         FBox(1,2,80,24,whiteonblue,1);
  300.    end;
  301.    if MainMenu.Style = 4 then
  302.    begin
  303.       ClearLine(1,WhiteOnBlue);
  304.       ClearLine(2,BlackOnLightgray);
  305.       MainMenu.DescX1 := 4;
  306.       MainMenu.DescX2 := 80;
  307.       MainMenu.DescY := 1;
  308.       GoldSetColor(PullMsgHot, whiteonblue);
  309.       GoldSetColor(PullMsg, lightgrayonblue);
  310.    end
  311.    else
  312.    begin
  313.       ClearLine(1,BlackOnLightgray);
  314.       ClearLine(25,BlackOnLightgray);
  315.       WriteCenter(25,0,'An emulation of Borland Pascal 7.0''s menu!!');
  316.    end;
  317. end; {SetScreen}
  318.  
  319. procedure DisposeMenus;
  320. {}
  321. begin
  322.    DestroyBar(MainMenu);
  323.    DestroyPopUp(FileMenu);
  324.    DestroyPopUp(EditMenu);
  325.    DestroyPopUp(SearchMenu);
  326.    DestroyPopUp(RunMenu);
  327.    DestroyPopUp(CompileMenu);
  328.    DestroyPopUp(DebugMenu);
  329.    DestroyPopUp(ToolsMenu);
  330.    DestroyPopUp(OptionsMenu);
  331.    DestroyPopUp(WindowMenu);
  332.    DestroyPopUp(HelpMenu);
  333.    DestroyPopUp(EnvironmentMenu);
  334. end; { DisposeMenus }
  335.  
  336. begin
  337. {$IFOPT D+}
  338.    HeapRecord;
  339. {$ENDIF}
  340.    UseCustomChars;
  341.    DefinePopUps;
  342.    DefineMainMenu;
  343.    AssignMenuHelpHook(MainMenu,MenuHelp);
  344.    MainMenu.Style := 2;
  345.    SetScreen;
  346.    DrawBar(MainMenu);
  347.    MouseShow(true);
  348.    Choice := ActivatePullmenu(MainMenu);
  349.    if Choice = 0 then
  350.       PromptOK(' Gold ','You escaped!')
  351.    else
  352.       PromptOK(' Gold ','You chose menu ID '+IntToStr(Choice));
  353.    MouseShow(false);
  354.    DisposeMenus;
  355.    PromptOK(' Suggestion ','Try changing the MainMenu.Style value|on line 343 to any value in the range|1..4!');
  356.    clear(LightGrayOnBlack,' ');
  357. {$IFOPT D+}
  358.    HeapCheck;
  359. {$ENDIF}
  360. end.
  361.